const tokenName="token";

export const setToken=(token)=>{
	uni.setStorageSync(tokenName,token)
}

export const removeToken=()=>{
	uni.removeStorageSync(tokenName)
}

export const getToken=()=>{
	return uni.getStorageSync(tokenName)
}

const userInfoName="userInfo"

export const setUserInfo=(userInfo)=>{
	uni.setStorageSync(userInfoName,JSON.stringify(userInfo))
}

export const removeUserInfo=()=>{
	uni.removeStorageSync(userInfoName)
}

export const getUserInfo=()=>{
	return JSON.parse(uni.getStorageSync(userInfoName))
}

